package org.fastng.xml {
	
	import mx.collections.ArrayCollection;
	
	/**
	 * An abstract implementation of a FastNG XML <define> node.
	 */
	public class XmlDefinition {	
		
		private var _groups:ArrayCollection;
		
		/**
		 * The name of the definition.
		 */
		public var name:String;
		
		/**
		 * The constructor initializes a holder for multiple groups.
		 */
		public function XmlDefinition():void {
			_groups = new ArrayCollection();
		}
		
		/**
		 * Adds a group to the definition.
		 * 
		 * @param test An instance of XmlGroup.
		 */
		public function addGroup(group:XmlGroup):void {
			_groups.addItem(group);
		}
		
		/**
		 * Returns all groups in the definition.
		 * 
		 * @return An instance of ArrayCollection.
		 */
		public function get groups():ArrayCollection {
			return _groups;
		}

	}
}